package com.smart.mapper;

import com.smart.pojo.LeaveBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smart.resp.LeaveBillResp;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lyj
 * @since 2023-05-02
 */
public interface LeaveBillMapper extends BaseMapper<LeaveBill> {

    @Select("select lb.*,u.username username\n" +
            "from leave_bill lb\n" +
            "left join user u\n" +
            "on lb.user_id=u.id\n" +
            "where lb.del_flag=0\n" +
            "and u.del_flag=0\n" +
            "and lb.id=#{billId}")
    LeaveBillResp queryByBillId(long billId);
}
